import request from "/@/utils/request";

export function addFacility(data: any) {
    console.log(data);
    return request({
        url: '/facility/facility/addFacility',
        method: 'post',
        data: data,
    });
}

export function deleteFacility(ids: Number[]) {
    return request({
        url: '/facility/facility/deleteFacility',
        method: 'delete',
        params: { ids },
    });
}

export function updateFacility(data: any) {
    return request({
        url: '/facility/facility/updateFacility',
        method: 'put',
        data: data,
    });
}
export function getFacilityList(query?: Object) {
    return request({
        url: '/facility/facility/page',
        method: 'get',
        params: query,
    });
}

export function getFacilityById(facilityId: Number) {
    return request({
        url: '/facility/facility/getFacilityById',
        method: 'get',
        params: { facilityId },
    });
}

